<?php

/**
 * AbetInstructor form base class.
 *
 * @method AbetInstructor getObject() Returns the current form's model object
 *
 * @package    sfproject
 * @subpackage form
 * @author     Your name here
 */
abstract class BaseAbetInstructorForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'                 => new sfWidgetFormInputHidden(),
      'ins_num'            => new sfWidgetFormInputText(),
      'ins_name'           => new sfWidgetFormInputText(),
      'ins_NicName'        => new sfWidgetFormInputText(),
      'CV_ins'             => new sfWidgetFormInputText(),
      'ins_sex'            => new sfWidgetFormInputText(),
      'ins_email'          => new sfWidgetFormInputText(),
      'ins_rank_name'      => new sfWidgetFormInputText(),
      'ins_rank_load'      => new sfWidgetFormInputText(),
      'ins_current_load'   => new sfWidgetFormInputText(),
      'abet_department_id' => new sfWidgetFormPropelChoice(array('model' => 'AbetDepartment', 'add_empty' => true)),
      'ins_special_role'   => new sfWidgetFormInputCheckbox(),
      'stu_t'              => new sfWidgetFormInputText(),
      'created_at'         => new sfWidgetFormDateTime(),
      'updated_at'         => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'id'                 => new sfValidatorChoice(array('choices' => array($this->getObject()->getId()), 'empty_value' => $this->getObject()->getId(), 'required' => false)),
      'ins_num'            => new sfValidatorString(array('max_length' => 2, 'required' => false)),
      'ins_name'           => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'ins_NicName'        => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'CV_ins'             => new sfValidatorString(array('max_length' => 30, 'required' => false)),
      'ins_sex'            => new sfValidatorString(array('max_length' => 2, 'required' => false)),
      'ins_email'          => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'ins_rank_name'      => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'ins_rank_load'      => new sfValidatorString(array('max_length' => 2, 'required' => false)),
      'ins_current_load'   => new sfValidatorInteger(array('min' => -2147483648, 'max' => 2147483647, 'required' => false)),
      'abet_department_id' => new sfValidatorPropelChoice(array('model' => 'AbetDepartment', 'column' => 'id', 'required' => false)),
      'ins_special_role'   => new sfValidatorBoolean(array('required' => false)),
      'stu_t'              => new sfValidatorString(array('max_length' => 2, 'required' => false)),
      'created_at'         => new sfValidatorDateTime(array('required' => false)),
      'updated_at'         => new sfValidatorDateTime(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('abet_instructor[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'AbetInstructor';
  }


}
